<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<head><title >BirthdayReminder | #{msg.loginTitle}</title>
<link href="css/mystyles.css" rel="stylesheet" type="text/css"/>
</head>
<h:body>
<f:view locale="#{languageBean.activeLocale}">
<div id="wrapper">
		
<h1>BirthdayReminder #{msg.loginTitle}</h1>
<div align="center">
	<fieldset>
<legend>#{msg.loginLegend}</legend>
<h:form id="myloginform">
<h:messages styleClass="error" globalOnly="true"/>

<table border="0" align="right" width="550">

  <tr>
  	<td width="20%">#{msg.loginUsername}</td><td width="30%"><h:inputText id="username" required="true" requiredMessage="#{msg.loginUsernameError}" /></td>
  	<td align="left" width="50%"><h:message for="username" styleClass="error" /></td>
  </tr> 
  
  <tr>
  	<td width="20%">#{msg.loginPassword}</td><td width="30%"><h:inputSecret id="password" required="true" requiredMessage="#{msg.loginPasswordError}"/></td>
  	<td align="left" width="50%"><h:message for="password" styleClass="error" /></td>
  </tr>
  
  <tr><td><h:commandButton value="#{msg.loginButton}" action="#{loginBean.doLogin}"/></td>  <!-- tries do login the User -->
  	<td>#{msg.loginRegisterq}<br></br><h:commandLink value="#{msg.loginRegisterl}" action="#{loginBean.navRegistration}" immediate="true"/></td>
  </tr>
  
  <tr>
  	<td></td>
  	<td>
  		<h:commandButton id="flag_de" actionListener="#{languageBean.useDe}" immediate="true" image="#{languageBean.numLocale == 1 ? 'pics/flag_de_active.png' : 'pics/flag_de2.png'}" />
  		<h:commandButton id="flag_en" actionListener="#{languageBean.useEn}" immediate="true" image="#{languageBean.numLocale == 0 ? 'pics/flag_en_active.png' : 'pics/flag_en2.png'}" />
  	</td>
  </tr>
</table>

</h:form>
	</fieldset>
</div>
</div>

</f:view>
</h:body>
</html>